<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>喜乐康智能家居系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  	<script type="text/javascript">
  		
  	var settingDeviceListCurrentPage = 1;
	currentDevice=0;
	currentDeviceId = 0;
	currentRoomId = 0;
	function settingDeviceListUp(upDown){
		 listOpenUp(settingDeviceListCurrentPage,"settingDeviceListCurrentPage",<s:property value="deviceList.size()"/>,10,
				 "setting_device_list_up",
				 "room_up.png",
				 "room_up_press.png",
				 "device_use_img_li",upDown);
	}
	
	
	function settingDeviceListDown(upDown){
		listOpenDown(settingDeviceListCurrentPage,"settingDeviceListCurrentPage",<s:property value="deviceList.size()"/>,10,
				"setting_device_list_down",
				"room_down.png",
				"room_down_press.png",
				"device_use_img_li",upDown);
		
	}
  	</script>
  	
  </head>
  
  <body>
  	<div class="setting_device_list_all">
  		<div class="setting_device_list">
	  		<ul>
	  			<s:iterator id="device" value="deviceList" status="status">
					<li onclick="pressDevice(<s:property value="deviceId" />,'<s:property value="#status.index+1" />','<s:property value="deviceType" />');" id="device_use_img_li<s:property value="#status.index+1" />" 
						<s:if test="deviceType==1 && isOpen == 1">
		   					class="device_use_img_li_on_off_open"
		   				</s:if>	
		   				<s:elseif test="deviceType==1 && isOpen == 0">
							class="device_use_img_li_on_off"
						</s:elseif>
						<s:elseif test="deviceType==2 && isOpen == 1">
							class="device_use_img_li_turn_open"
						</s:elseif>
						<s:elseif test="deviceType==2 && isOpen == 0">
							class="device_use_img_li_turn"
						</s:elseif>
		   				<s:elseif test="deviceType==3 && isOpen == 1">
							class="device_use_img_li_socket_open"
						</s:elseif>	
						<s:elseif test="deviceType==3 && isOpen == 0">
							class="device_use_img_li_socket"
						</s:elseif>	
						<s:if test="#status.index+1 > 10">
		   					style="display:none;"
		   				</s:if>	
					><s:property value="deviceName"/></li>
				</s:iterator>
	  		</ul>
	  	</div>
	  	<div class="setting_device_list_up_down">
	  		<div class="setting_device_list_up" onmousedown="settingDeviceListUp('down')" onmouseup="settingDeviceListUp('up')">
	  		</div>
	  		<div class="setting_device_list_down" onmousedown="settingDeviceListDown('down')" onmouseup="settingDeviceListDown('up')">
	  		</div>
	  	</div>
  	</div>
  </body>
</html>
